package com.frame.util;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.Tag;
import javax.servlet.jsp.tagext.TagSupport;

import com.pioneer.app.dev.osuser.user.Userlist;

public class ComponentSecurityTag extends TagSupport {
	private PageContext pageContext;
	private Tag parent;
	
	private String processcode;
	
	public int doStartTag() throws JspException 
	{
		
		
  	if(ProviewTest.isPreview(this.pageContext, processcode)){
  		return Tag.EVAL_BODY_INCLUDE;
  	}else{
  		try {
				//pageContext.getOut().write("@");
				return Tag.SKIP_BODY;
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
  		//
			return Tag.EVAL_BODY_INCLUDE;
  	}
		
		

	}
	
	public int doEndTag() throws JspException 
	{
		return Tag.EVAL_PAGE;
	}

	public Tag getParent() {
		return parent;
	}

	public void setParent(Tag parent) {
		this.parent = parent;
	}

	public String getProcesscode() {
		return processcode;
	}

	public void setProcesscode(String processcode) {
		this.processcode = processcode;
	}

	public PageContext getPageContext() {
		return pageContext;
	}

	public void setPageContext(PageContext pageContext) {
		this.pageContext = pageContext;
	}

}
